1. Field of the Invention
The present invention relates to devices and systems for writing data to magnetic tape, and more particularly, to a system and method for writing data to a magnetic tape.
2. Background Information
Tape drives are configured to write data to a magnetic tape. Data is written to the magnetic tape by first accumulating the data in a buffer. Data is then written from the buffer to a magnetic tape, via a write head, at a predetermined timing. Such a write data operation is referred to in the art as a “buffer flush” or “synchronization of writes”, hereinafter synchronization.
If a synchronization is carried out without stopping the tape, a long gap on the tape can occur between the data written by a first synchronization and the data written by a subsequent synchronization. As a result, recording area of the tape is wasted.
Therefore, a backhitch is needed so that data is written by a subsequent synchronization, without the long gap on the tape between synchronizations. A backhitch requires that the tape be stopped, reversed to beyond the end of the previous synchronization, stopped again, and accelerated up to speed in the original direction by the time that the end of the previous synchronization is reached. As is understood by those of skill in the art, the backhitch process consumes a considerable amount of time, and the throughput of the tape drive may be reduced dramatically.
A technique for overcoming the disadvantage of backhitch operations is a Recursive Accumulating Backhitchless Flush (RABF) operation. Generally, in an RABF operation, a controller of the tape drive first writes data in a buffer. The tape drive receives a synchronization request and the tape drive writes the data from the buffer to a temporary recording area on the tape, with the tape continuously traveling. Simultaneously, the controller recursively accumulates data in the buffer and writes back the data to a normal recording area when either the buffer or the temporary recording area becomes full. Therefore, an RABF synchronization does not need a backhitch for subsequent synchronizations and the time required for synchronization can be reduced.
An exemplary RABF is disclosed in U.S. Pat. No. 6,856,479, to Jaquette et al., and assigned to International Business Machines Corporation, Armonk, N.Y. Disclosed therein, is a controller that detects a pattern of synchronizing events for received data records to be written to tape. The controller writes each transaction data records to the magnetic tape, accumulates the synchronized transactions in a buffer, and subsequently recursively writes the accumulated transactions of data records from the buffer to the tape in a sequence. A single backhitch may be employed to place the recursively written accumulated data records following the preceding data.
Another exemplary RABF is disclosed in U.S. Pat. No. 6,865,043, to Akaku et al., assigned to International Business Machines Corporation, Armonk, N.Y. Disclosed therein, special fields for error recovery are provided in data set information tables of data sets written with synchronized transactions. If a transaction only partially fills a data set, that data set is rewritten in a succeeding data set, appending the next transaction. A moving access point in the table identifies the appended transaction, allowing the rewritten transaction to be skipped during read recovery. The table provides recovery trails by providing a thread to the data sets together, the status of the data set, and pointers, such as identifying the wrap of the immediately succeeding data set.
However, under certain circumstances the controller of the tape drive may not immediately respond to a synchronization request. For example, specific to linear recording, a change in the recording position of the write head may delay the response to the synchronization request. Examples of recording position changes include wrap-change where the position of the write head changes in the tape-width direction and wrap-turn where the position of the write head changes in the recording direction of the tape. A “wrap” is defined in the art as a plurality of tracks, typically 8 tracks, and is a unit by which heads read and write data. When there has been a change in the recording position of the write head, the head may not be positioned at a predetermined track position, and writing or synchronization cannot be performed.
Another circumstance where the controller of the tape drive may not immediately respond to a synchronization request is when the write head is in the process of rewriting. Currently, no synchronization request can be received and processed during rewriting, which may lead to degradation of the performance of the tape drive. Thus, if the controller were able to receive and process a synchronization request, while the tape head was in the process of rewriting, performance of the tape drive could be improved.
Accordingly, there is a clearly-felt need in the art for a tape drive that provides improved tape throughput and an improved data writing.